package gui.newComponent;

import javax.swing.*;
import java.util.HashMap;
import java.util.ArrayList;

public class FWComboBox extends JComboBox{
    private ArrayList<Integer> values_keys = new ArrayList<Integer>();
    public void addItem(int ID,Object anObject) {
        this.values_keys.add(ID);
        super.addItem(anObject);
    }

    public int getSelectedIndex() {
        if (super.getSelectedIndex() != -1){
            return this.values_keys.get(super.getSelectedIndex());
        }else{return -1;}        
    }
}
